//
//  SearchInputTipsResultModel.m
//  o_amap
//
//  Created by Q神 on 2021/4/20.
//

#import "SearchInputTipsResultModel.h"

@implementation SearchInputTipsResultModel

+ (NSDictionary *)mj_objectClassInArray {
    return @{@"tips": @"TipsModel"};
}

+ (SearchInputTipsResultModel *)createInputTipsResultModelWithResponse:(AMapInputTipsSearchResponse *)response {
    SearchInputTipsResultModel *model = [[SearchInputTipsResultModel alloc] init];
    NSMutableArray<TipsModel *> * arrays = [NSMutableArray array];
    for (AMapTip *tip in response.tips) {
        TipsModel *tipsModel = [[TipsModel alloc] init];
        tipsModel.adcode = tip.adcode;
        tipsModel.address = tip.address;
        tipsModel.district = tip.district;
        tipsModel.name = tip.name;
        tipsModel.poiID = tip.uid;
        tipsModel.typeCode = tip.typecode;
        tipsModel.point = [LatLngModel initWithLat:tip.location.latitude withLng:tip.location.longitude];
        
        [arrays addObject:tipsModel];
    }
    model.tips = arrays;
    return model;
}

@end


@implementation TipsModel

@end
